Skip to content
This repository was archived by the owner on Feb 12, 2021. It is now read-only.

Conversation

@singh1114
Copy link
Collaborator

Signed-off-by: Ranvir Singh ranvir.singh1114@gmail.com

Copy link
Member

@JonoYang JonoYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay! We appreciate your work. Please take a look at the comments. @pombredanne can also provide his thoughts too.


scan = models.ForeignKey(Scan)
path = models.CharField(max_length=400, help_text='Path of file scanned')
type = models.CharField(max_length=400, help_text='Type of the entity being scanned')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment, there is no proper documentation of what the fields are in ScanCode, so we may use this help text as a definition for the fields. Thanks for getting it started for us!

That said, there can be some improvements made to the text to make it more accurate. For example, in the case of type, it should just say "Type of resource: file or directory". Do not use "entity" as anything we scan is either a file or a directory. Also remove "being scanned" from the text, it is not necessary.

Some other suggestions:

name: "Name of the file or directory"
date: "Creation date of file or directory"

etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, that seems fair...

help_text='Base name of entity without extension',
)
extension = models.CharField(
max_length=400,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

400 seems to be big for a field that just stores the file extension. This can be changed to something smaller. You should also take a look at other field sizes and make them smaller.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

Signed-off-by: Ranvir Singh ranvir.singh1114@gmail.com
* Remove scan_error field from ScannedFile model
* change the corresponding migrations

Signed-off-by: Ranvir Singh ranvir.singh1114@gmail.com
* Change the models to add defaults to BooleanFields
* Change the migrations due to changes in the models

Signed-off-by: Ranvir Singh ranvir.singh1114@gmail.com
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants